GXInitializeStatusAlert
QuickDraw GX sends theGXInitializeStatusAlert
message when a driver calls theGXAlertTheUser
function with a status structure containing a status type ofgxUserAlert
. You need to override theGXInitializeStatusAlert
message if you want to provide custom alerts. Your override of theGXInitializeStatusAlert
message needs to be declared as follows.
OSErr MyInitializeStatusAlert (gxStatusRecord *statRecPtr, DialogPtr *dPtr);
statRecPtr
- A pointer to the status structure.
dPtr
- A pointer to the dialog box pointer.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
The default implementation of theGXInitializeStatusAlert
message is the automatic handling of the standard printing ('plrt'
) alert boxes.You do not need to override this message if your alert is one of the standard alerts for which QuickDraw GX provides automatic handling, as described in the chapter "Printer Drivers" in this book. If you want to provide custom alerts, first check the
statusOwner
field of the status structure to make sure that this message is intended for you. If so, perform a total override of this message. You must create a dialog box and return a pointer to it. You can call theGetNewDialog
function for the specified alert and then perform any necessary dialog box initialization.SPECIAL CONSIDERATIONS
You never send theGXInitializeStatusAlert
message yourself.If the
statusOwner
field of the status structure matches your signature, you perform a total override of theGXInitializeStatusAlert
message. Otherwise, forward the message so that another message handler can respond to it.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. SEE ALSO
You can find an example of an overide of theGXInitializeStatusAlert
message in Listing 3-17 on page 3-45 in the chapter "Printer Drivers."The
GXAlertTheUser
function is described on page 5-18 in the chapter "Printing Functions for Message Overrides."The
GetNewDialog
function is described in Inside Macintosh: Macintosh Toolbox Essentials.The status structure is described on page 4-39.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help